﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace HY.BLL.HR
{
    public  class hr_ot
    {

     public  DataTable getlist(string tab,string filed,string whe)
        {
            string strsql = "select "+filed+" from " + tab +" where 1=1";
             if (whe!="")        strsql=strsql+whe;
             return DAL.DbHelperSQL.SqlDataAdapter(strsql);
        }

        /// <summary>
        /// 获取部门
        /// </summary>
        /// <returns></returns>
     public DataTable getlist_dept(string whe)
     {
         string strsql = "select * from sys_dept where 1=1";
         if (whe != "") strsql = strsql + whe;
         return DAL.DbHelperSQL.SqlDataAdapter(strsql);
     }

     /// <summary>
     /// 获取角色
     /// </summary>
     /// <returns></returns>
     public DataTable getlist_role(string whe)
     {
         string strsql = "select * from sys_role where 1=1";
         if (whe != "") strsql = strsql + whe;
         return DAL.DbHelperSQL.SqlDataAdapter(strsql);
     }

     /// <summary>
     /// 获取职位
     /// </summary>
     /// <returns></returns>
     public DataTable getlist_job(string whe)
     {
         string strsql = "select * from sys_job where 1=1";
         if (whe != "") strsql = strsql + whe;
         return DAL.DbHelperSQL.SqlDataAdapter(strsql);
     }


     /// <summary>
     /// 获取学历
     /// </summary>
     /// <returns></returns>
     public DataTable getlist_edu(string whe)
     {
         string strsql = "select * from sys_edu where 1=1";
         if (whe != "") strsql = strsql + whe;
         return DAL.DbHelperSQL.SqlDataAdapter(strsql);
     }


    }
}
